package com.cardbaobao.cardbabyclient.utils;

/**
 * Created by Jiangzx on 18:03.
 */

public class AuthStateUtils {
    public static final String AUTH_STATE_UN_AUTH="未授权";
    public static final String AUTH_STATE_AUTH_ING="授权中";
    public static final String AUTH_STATE_AUTHORIZED="已授权";
    public static final String AUTH_STATE_EXPIRED="已过期";
    public static final String AUTH_STATE_FAILURE="授权失败";
    public static boolean isSuccess(int code){
        return code==0||code==100||code==137||code==2007||code==2012;
    }

    public static boolean canEnterAuth(String text){
        return AUTH_STATE_UN_AUTH.equals(text)||
                AUTH_STATE_EXPIRED.equals(text)||
                AUTH_STATE_FAILURE.equals(text);
    }
}
